package com.hk.service.impl;

import java.sql.Timestamp;

import org.springframework.stereotype.Service;

import com.hk.commons.LongId;
import com.hk.commons.entity.Customer;
import com.hk.dao.base.impl.BaseServiceImpl;
import com.hk.service.sys.ICustomer;


@Service
public class CustomerImpl extends BaseServiceImpl<Customer> implements ICustomer {

	@Override
	public Customer findById(Long id) {
		return getById(id);
	}

	@Override
	public Long add(Customer cu) {
		Long id = LongId.get();
		cu.setId(id);
		cu.setCreateTime( System.currentTimeMillis());
		super.save(cu);
		return id;
	}

	@Override
	public Customer delete(Long id) {
		Customer model=new Customer();
		model.setId(id);
		delete(model);
		return model;
	}


}
